//
//  STRegisHanlde.m
//  CuiBoStore
//
//  Created by 崔博 on 16/12/2.
//  Copyright © 2016年 崔博. All rights reserved.
//

#import "STRegisHanlde.h"

@implementation STRegisHanlde
+ (void)executeGetYanZhengMaNumber:(NSString *)phoneNum WitchSucess:(SucessBlock)sucess failed:(FailedBlock)failed
{
    [HttpTool postWithPath:REGISAUTHOCODE params:@{@"MemberId":phoneNum} success:^(id json) {
        sucess(json[@"result"]);
    } failure:^(NSError *error) {
        
    }];
}

+ (void)executeRegisUserYazhengma:(NSDictionary *)userInfo WitchSucess:(SucessBlock)sucess failed:(FailedBlock)failed
{
    [HttpTool getWithPath:REGISUSER params:userInfo success:^(id json) {
        
        sucess(json[@"result"]);
        
    } failure:^(NSError *error) {
        
    }];
}
// 登录
+ (void)executeLogin:(NSDictionary *)phoneNumber sucess:(SucessBlock)sucess failed:(FailedBlock)failed
{
    [HttpTool postWithPath:LOGIN params:phoneNumber success:^(id json) {
        
        if ([json[@"ErrorMessage"] isEqualToString:@"登录成功"]) {
            sucess(json);
        }else{
            sucess(json);
        }
    } failure:^(NSError *error) {
        failed(error);
    }];
}
@end
